package org.blogsite.greencode.service.impl;

import java.util.List;

import org.blogsite.greencode.bean.InstructorManage_Instructor;
import org.blogsite.greencode.bean.Schooling_Instructor_Course;
import org.blogsite.greencode.bean.TeachingSupport_Course;
import org.blogsite.greencode.dao.SchoolingManageDAO;
import org.blogsite.greencode.dao.impl.SchoolingManageDAOImpl;
import org.blogsite.greencode.service.SchoolingManageService;

/**
 * @author：wzj
 * E-mail: jsun789@gmail.com
 * @date：2010-7-28 下午05:54:01
 */
public class SchoolingManageServiceImpl implements SchoolingManageService {
	
	
	private SchoolingManageDAO schoolingManageDao;
	

	public SchoolingManageDAO getSchoolingManageDao() {
		return schoolingManageDao;
	}

	public void setSchoolingManageDao(SchoolingManageDAO schoolingManageDao) {
		this.schoolingManageDao = schoolingManageDao;
	}
	//保存授课单
	public void save(Schooling_Instructor_Course schoolingInstructorCourse) {
		
		schoolingManageDao.save(schoolingInstructorCourse);

	}
	//获取所有课程名称
	public List getAllCourseName(){
		
		return schoolingManageDao.getAllCourseName();
	}
	// 获取所有讲师姓名
	public List getAllInstructorName(){
		
		return schoolingManageDao.getAllInstructorName();
	}
	//获取指定课程名的详细信息
	public TeachingSupport_Course getCourseById(int id){
	//	TeachingSupport_Course cour= schoolingManageDao.getCourseById(1);
	//	System.out.println(cour.getCno()+cour.getName());
		return schoolingManageDao.getCourseById(id);
	}

	// 获取指定讲师的详细信息
	public InstructorManage_Instructor getInstructorById(int id){
		return schoolingManageDao.getInstructorById(id);
	}
	//获取所有授课单
	public List getAllTimeTable(){
		return schoolingManageDao.getAllTimeTable();
	}
	//查询指定课程号授课单
	public List getTimeTableByCno(int id){
		return schoolingManageDao.getTimeTableByCno(id);
	}
	//查询指定讲师号授课单
	public List getTimeTableByIno(int id){
		return schoolingManageDao.getTimeTableByIno(id);
	}
	//模糊查询授课单
	public List getTimeTableByBlear(String text){
		return schoolingManageDao.getTimeTableByBlear(text);
	}
	//修改授课单
	public  void updateTimeTable(Schooling_Instructor_Course schoolingInstructorCourse){
		schoolingManageDao.updateTimeTable(schoolingInstructorCourse);
	}
	//删除授课单
	public void deleteTimeTable(Schooling_Instructor_Course schoolingInstructorCourse){
		schoolingManageDao.deleteTimeTable(schoolingInstructorCourse);
	}
}
